<template>
    <div class="c-card-detail-a">
        <div class="title_wrap">
            <div class="title">从偏见到音乐，从呼吸到设计，与理享家们<br />一起，找寻理享生活进化的多面性<br />#理享生活，不止一面#。</div>
        </div>
        <div class="banner_wrap">
            <div :class="`banner ${current === index ? 'active' : ''}`" v-for="(item, index) in banner" :key="index" @click="onTapBanner(index)">
                <img :src="item.img" />
            </div>
        </div>
        <div class="van-swipe">
            <van-swipe @change="onChange" :autoplay="5000" :show-indicators="false" :initial-swipe="current">
                <van-swipe-item v-for="(item, index) in banner" :key="index" style="height: 2.59rem">
                    <div class="containers">
                        <div class="title_wrap mb">
                            <span class="title">{{ item.title }}</span>
                            <span class="and" v-if="item.sp">/</span>
                            <span class="sp">{{ item.sp }}</span>
                        </div>
                        <p class="content">{{ item.content }}</p>
                    </div>
                </van-swipe-item>
                <!-- 自定义指示器 -->
                <template #indicator>
                    <div class="indicator_wrap">
                        <i
                            :class="`indicator ${index === current ? 'active' : ''}`"
                            v-for="(item, index) in banner"
                            :key="index"
                        ></i>
                    </div>
                </template>
            </van-swipe>
        </div>
        <div class="shalong">
            <div class="title_wrap">
                <div class="title">沙龙流程</div>
            </div>
            <div class="process">
                <div class="left"></div>
                <div class="right">
                    <div class="right_item" v-for="(item, index) in shalong" :key="index">
                        <div class="top">
                            <div class="title">{{ item.title }}</div>
                            <div class="time">{{ item.time }}</div>
                        </div>
                        <div class="bottom">{{ item.sp }}</div>
                    </div>
                </div>
            </div>
        </div>
        <div class="video_wrap">
            <div class="title_wrap">
                <div class="title">现场视频</div>
            </div>
            <div class="video">
                <video controls controlslist="nodownload" src="@/assets/images/video1.mp4"  poster="@/assets/images/video1-poster.jpg"></video>
            </div>
        </div>
        <c-backTop @close="$emit('close')" />
    </div>
</template>
<script>
import { Swipe, SwipeItem } from 'vant'
export default {
    props: {
        moreStatus: {
            type: Boolean,
            default: false
        }
    },
    watch: {
        'moreStatus' (n, o) {
            if (n) {
                this.current = 0
            }
        }
    },
    data () {
        return {
            banner: [
                {
                    img: require('@/assets/images/type-0-banner1.jpg'),
                    title: '许知远',
                    sp: '偏见理享家',
                    content: '作家、单向空间创始人、《十三邀》主创，主要作品有《青年变革者：梁启超1873-1898》、《游荡集》等'
                },
                {
                    img: require('@/assets/images/type-0-banner2.jpg'),
                    title: '李星宇',
                    sp: '心声理享家',
                    content: '独立音乐制作人及声学空间设计师，以鲸鱼马戏团的名义独立发行音乐专辑，并在业余时间担任北京现代音乐研修学院外聘教师。'
                },
                {
                    img: require('@/assets/images/type-0-banner3.jpg'),
                    title: 'Tiffany',
                    sp: '呼吸理享家',
                    content: '众明星名模私人瑜伽导师，教学经验近20年，中国首个线上线下全平台瑜伽教育品牌OMMA创始人，拥有百万粉丝，线上教学累计观看人次破1千6百万。'
                },
                {
                    img: require('@/assets/images/type-0-banner4.jpg'),
                    title: '欧杰',
                    sp: '灵感理享家',
                    content: 'COLMO工业设计总监，7年工业设计经验，19年专研白电产品工业设计，4年用户研究与洞察，带领团队多次获得IF奖、红点奖、GOOD DESIGN AWARD等国际工业设计大奖。'
                }
            ],
            current: 1,
            shalong: [
                {
                    title: '理享家入场',
                    time: '13:00-14:00',
                    sp: '嘉宾入场签到'
                },
                {
                    title: '表演开场',
                    time: '13:30-14:10',
                    sp: '拉开沙龙序幕'
                },
                {
                    title: '领导致辞',
                    time: '14:10-14:20',
                    sp: '展示COLMO带来的理享生活图景'
                },
                {
                    title: '“偏见”Talk',
                    time: '14:20-14:30',
                    sp: '理享与偏见的菁英视界'
                },
                {
                    title: '理享家对谈',
                    time: '14:30-15:10',
                    sp: '各领域大咖荟聚一堂，理享无界畅谈'
                },
                {
                    title: '启动仪式',
                    time: '15:10-15:15',
                    sp: 'COLMO理享生活正式开启'
                },
                {
                    title: '体验品鉴',
                    time: '15:15-17:00',
                    sp: '沉浸式体验COLMO全套系产品'
                }
            ]
        }
    },
    methods: {
        onTapBanner (index) {
            this.current = index
        },
        onChange (index) {
            this.current = index
        }
    },
    components: {
        'van-swipe': Swipe,
        'van-swipe-item': SwipeItem
    }
}
</script>
<style lang="less" scoped>
.c-card-detail-a{
    background-color: #fff;
    padding-top: 0.48rem;
    &>.title_wrap{
        width: 5.7rem;
        margin: 0 auto;
        margin-bottom: 0.53rem;
        position: relative;
        height: 1.89rem;
        .title{
            font-size: 0.24rem;
            text-align: center;
            line-height: 0.38rem;
            padding: 0.38rem 0 0.35rem;
            border: 1px solid #a3a3a3;
            position: absolute;
            top: 0;
            left: 0;
            z-index: 1;
            width: 100%;
            background-color: #fff;
        }
        &::after{
            content: '';
            width: 100%;
            height: 100%;
            border: 1px solid #a3a3a3;
            position: absolute;
            right: -0.14rem;
            bottom: -0.1rem;
            z-index: 0;
            background-color: #fff;
        }
    }
    &>.banner_wrap{
        height: 3.29rem;
        padding: 0 0.23rem 0 0.67rem;
        display: flex;
        align-items: center;
        .banner{
            margin-right: 0.06rem;
            width: 1.38rem;
            height: 1.78rem;
            border-radius: 0.05rem;
            overflow: hidden;
            transition: all ease-in 0.1s;
            position: relative;
            &:last-of-type{
                margin-right: 0;
            }
            &::after{
                content: '';
                width: 100%;
                height: 100%;
                top: 0;
                left: 0;
                background-color: rgba(0, 0, 0, 0.7);
                position: absolute;
            }
            &.active{
                width: 1.72rem;
                height: 2.33rem;
                &::after{
                    background-color: rgba(0, 0, 0, 0);
                }
            }
            img{
                width: 100%;
                height: 100%;
                position: absolute;
                top: 0;
            }
        }
    }
    .van-swipe{
        .containers{
            width: 6.9rem;
            padding: 0 0.75rem 0 0.65rem;
            color: #000000;
            font-weight: 700;
            box-sizing: border-box;
            .title_wrap{
                display: flex;
                flex-wrap: nowrap;
                white-space: nowrap;
                font-weight: 700;
                span{
                    display: flex;
                    align-items: center;
                }
            }
            .title{
                font-size: 0.34rem;
            }
            .and{
                font-size: 0.28rem;
                margin: 0 5px;
            }
            .sp{
                font-size: 0.22rem;
            }
            .mb{
                margin-bottom: 0.25rem;
            }
            .content{
                font-size: 0.22rem;
                font-weight: 500;
                line-height: 0.32rem;
            }
        }
        .indicator_wrap {
            position: absolute;
            width: 100%;
            bottom: 0.25rem;
            left: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            .indicator {
                width: 0.08rem;
                height: 0.08rem;
                border-radius: 0.04rem;
                background: #959595;
                margin-right: 0.09rem;
                overflow: hidden;
                &:last-of-type {
                    margin-right: 0;
                }
                &.active {
                    transition: all linear 0.05s;
                    width: 0.3rem;
                    background: #000000;
                }
            }
        }
    }
    .shalong{
        padding-top: 0.39rem;
        &>.title_wrap{
            padding-bottom: 0.74rem;
            padding-left: 0.67rem;
            display: flex;
            .title{
                font-size: 0.32rem;
                color: #000000;
                font-weight: 700;
                display: inline-block;
                padding: 0 0.1rem;
                box-shadow: 0 -0.16rem 0px #cb8345 inset;
            }
        }
        .process{
            display: flex;
            margin-bottom: 1rem;
            .left{
                width: 0.72rem;
                border-right: 0.015rem solid #000000;
                color: #fff;
            }
            .right{
                flex: 1;
                border-left: 0.015rem solid #000000;
                color: #000000;
                .right_item{
                    padding: 0.04rem 0.47rem;
                    position: relative;
                    margin-bottom: 0.48rem;
                    &:last-of-type{
                        margin-bottom: 0;
                    }
                    .top{
                        display: flex;
                        align-items: center;
                        margin-bottom: 0.14rem;
                        font-weight: 700;
                        .title{
                            font-size: 0.3rem;
                            margin-right: 0.18rem;
                        }
                        .time{
                            font-size: 0.22rem;
                        }
                    }
                    .bottom{
                        font-size: 0.22rem;
                    }
                    &::after, &::before{
                        content: '';
                        border-radius: 50%;
                        position: absolute;
                        top: 50%;
                        left: 0;
                        transform: translate(calc(-50% - 0.015rem), -50%);
                        overflow: hidden;
                    }
                    &::after{
                        width: 0.18rem;
                        height: 0.18rem;
                        background-color: #e0b58f;
                        z-index: 0;
                    }
                    &::before{
                        width: 0.12rem;
                        height: 0.12rem;
                        background-color: #cb8345;
                        z-index: 1;
                    }
                }
            }
        }
    }
    .video_wrap{
        padding-bottom: 0.58rem;
        &>.title_wrap{
            display: flex;
            justify-content: center;
            align-items: center;
            margin-bottom: 0.32rem;
            .title{
                font-size: 0.32rem;
                color: #000000;
                font-weight: 700;
                display: inline-block;
                padding: 0 0.1rem;
                box-shadow: 0 -0.16rem 0px #cb8345 inset;
            }
        }
        .video{
           width: 5.64rem;
        //    height: 2.6rem;
           margin: 0 auto;
           border-radius: 0.09rem;
           overflow: hidden;
           img{
               width: 100%;
               height: 100%;
           }
           video{
               width: 100%;
               height: 100%;
               outline: none;
           }
        }
    }
}
</style>
